Skip to content

feat(i18n): add Farsi (fa) locale for app, UI, and desktop - #40387

Closed
pourmirzai wants to merge 1 commit into
anomalyco:devfrom
pourmirzai:i18n-fa-locale
Closed

feat(i18n): add Farsi (fa) locale for app, UI, and desktop#40387
pourmirzai wants to merge 1 commit into
anomalyco:devfrom
pourmirzai:i18n-fa-locale

Conversation

@pourmirzai

@pourmirzai pourmirzai commented Aug 4, 2026

Copy link
Copy Markdown

Issue for this PR

Builds on localization work in #37184 (docs/README/glossary fa) and #34396 (closed), fills the app/UI/desktop locale gap left by auto-closed #33338.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds full Persian (Farsi, fa) locale support for non-terminal surfaces — app web UI, shared UI components, and desktop Electron wrapper — with complete key/placeholder parity, adapted to the new centralized locale structure introduced in dev.

Files changed (9):

  • packages/app/src/i18n/fa.ts (new, 996 keys, 1104 lines)
  • packages/ui/src/i18n/fa.ts (new, 171 keys)
  • packages/desktop/src/renderer/i18n/fa.ts (new, 21 keys)
  • packages/app/src/i18n/en.ts (+language.fa: فارسی)
  • packages/app/src/i18n/desktop-native.ts (+fa to DESKTOP_NATIVE_LOCALES)
  • packages/app/src/context/language.tsx (RTL, INTL, LABEL_KEY, loaders, localeMatchers)
  • packages/desktop/src/renderer/i18n/index.ts (imports, detectLocale, build)
  • packages/app/src/i18n/parity.test.ts (+fa to ^GppLocales)
  • script/translate-app.ts (+ a: Farsi)

All locale registrations follow the new centralized structure from recent i18n refactors (desktop-native.ts locale source of truth, RTL_LOCALES for direction detection, etc.).

Key parity verified: standalone bun script confirms 996/996 (app), 171/171 (ui), 21/21 (desktop) with 0 placeholder mismatches.

How did you verify your code works?

  • Typecheck passes for packages/app and packages/desktop (tsgo -b)
  • Parity verified via standalone bun module import: 0 missing, 0 extra keys, 0 placeholder mismatches
  • Locale registration follows existing patterns (all loaders, localeMatchers, RTL_LOCALES updated)

Note: The official parity.test.ts is skipIf(CI) and may report drift due to pre-existing gaps in other locales (not introduced by fa).

Screenshots / recordings

N/A (i18n strings only — no UI layout changes; RTL already partially implemented in dev)

Checklist

  • I have tested my changes locally (typecheck verified; desktop/web runtime testing deferred)
  • I have not included unrelated changes in this PR (9 files, all i18n-related)

If you do not follow this template your PR will be automatically rejected.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 4, 2026
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

@github-actions github-actions Bot closed this Sep 4, 2026
@pourmirzai
pourmirzai deleted the i18n-fa-locale branch September 6, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant